import { FC } from 'react';
import Image from '@/components/Image';

import icon1 from '@/assets/cyl/icon/icon1.png';
import icon2 from '@/assets/cyl/icon/icon2.png';
import icon3 from '@/assets/cyl/icon/icon3.png';
import icon4 from '@/assets/cyl/icon/icon4.png';
import icon5 from '@/assets/cyl/icon/icon5.png';
import styles from './style.less';

import { buildBoardIcon } from './../config';
import { boardTitle, dataBoard } from '@/interface/cyl';
interface props {
  data: dataBoard;
}
const TotalNum: FC<props> = (props) => {
  const { data } = props;
  return (
    <div className={styles.wrap}>
      {data.map((item) => (
        <div key={item.title}>
          <Image src={buildBoardIcon(item.title)}></Image>
          <p>{item.title}</p>
          <span>
            {item.val || 0}
            {item.danWei}
          </span>
        </div>
      ))}
    </div>
  );
};
export default TotalNum;
